'use strict';

const expect = require('chai').expect;
const SourceXici = require('../lib/proxy_source_xici.js');

// let proxyPool = new ProxyPool();
// proxyPool.start();

describe('test xici', function() {
  let sourceName;
  let fetchProxy;
  before(() => {
    sourceName = SourceXici.name;
    fetchProxy = SourceXici.func;
  });

  it('xici exists', function() {
    expect(sourceName).to.be.string;
    expect(fetchProxy).not.be.not.null;
  });

  it('fetch proxy', async function() {
    this.timeout(50000);
    let list = await fetchProxy();
    expect(list).to.have.lengthOf.at.least(1);
  });
});